X-Git-Url: http://git.cyclocoop.org/%22.%24info%5B?a=blobdiff_plain;f=includes%2Fspecials%2FSpecialImport.php;h=9e9f8c083e2fc43a45a9b23329f399dc439118a0;hb=958167760104b037db7db0a3c64e248052217759;hp=3d762aa3138620b153f30ebcf9f096322414d042;hpb=8a52d9af46bfee45737c0b8b05e174c843382579;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/specials/SpecialImport.php b/includes/specials/SpecialImport.php index 3d762aa313..9e9f8c083e 100644 --- a/includes/specials/SpecialImport.php +++ b/includes/specials/SpecialImport.php @@ -47,17 +47,20 @@ class SpecialImport extends SpecialPage { */ public function __construct() { parent::__construct( 'Import', 'import' ); - $this->namespace = $this->getConfig()->get( 'ImportTargetNamespace' ); } /** * Execute * @param string|null $par + * @throws PermissionsError + * @throws ReadOnlyError */ function execute( $par ) { $this->setHeaders(); $this->outputHeader(); + $this->namespace = $this->getConfig()->get( 'ImportTargetNamespace' ); + $this->getOutput()->addModules( 'mediawiki.special.import' ); $user = $this->getUser(); @@ -157,7 +160,7 @@ class SpecialImport extends SpecialPage { array( 'importfailed', $source->getWikiText() ) ); } else { - $importer = new WikiImporter( $source->value ); + $importer = new WikiImporter( $source->value, $this->getConfig() ); if ( !is_null( $this->namespace ) ) { $importer->setTargetNamespace( $this->namespace ); } @@ -251,7 +254,7 @@ class SpecialImport extends SpecialPage { Xml::label( $this->msg( 'import-comment' )->text(), 'mw-import-comment' ) . "